package com.example.controller;

import com.example.entity.RestBean;
import com.example.entity.vo.response.MenusVO;
import com.example.service.MenuService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/api/admin")
public class AdminController {

    @Resource
    MenuService service;

    @GetMapping("/menus")
    public RestBean<List<MenusVO>> menuList() {
        return RestBean.success(service.getMuneList());
    }
}
